﻿
<template>
    <div>
        <treeselect v-model="pzoption.value" placeholder="请选择班级" noOptionsText="没有可选项...."     value-consists-of="LEAF_PRIORITY" :options="dataset"  :multiple="dx"  :show-count="true" :limit="3" />
    </div>
</template>

<script>
    Vue.component('treeselect', VueTreeselect.Treeselect);
    module.exports = {
        props: ['pzoption', 'isdx'],
        data() {
            return {
                dataset: [],
                props: {
                    multiple: false,
                    value: "jsdm",
                    label: "jsmc"
                },
            };
        },
        computed: {
            dx: function () {
                return this.isdx == "";
            }
        },
        mounted: function () {
            var chi = this;
            chi.$nextTick(function () {
                $.getJSON('/API/VIEWAPI.ashx?Action=QJJW_GETBJTREEDATA', {}, function (resultData) {
                    if (!resultData.ErrorMsg) {
                        chi.dataset = resultData.Result;

                    }
                })


            })

        }
    };
</script>